package com.jw.qme.domain.enun;

import com.jw.qme.socket.message.MessageType;
import lombok.Data;

/**
 * ClassName: com.jw.qme.domain.enun
 * Datetime: 2025/4/30 下午8:31
 * Description:
 *
 * @author 汪佳泉
 * @version 1.0
 * @since 1.0
 */
public enum FriendStatus {

    PENDING(0, "待处理"),
    ACCEPTED(1, "已同意"),
    REJECTED(2, "已拒绝"),
    DELETED(3, "已删除"),
    ;

    private Integer value;
    private String desc;

    FriendStatus(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    // 根据Value获取枚举值
    public static FriendStatus fromValue(int value) {
        for (FriendStatus type : values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        return null;
    }

}
